package cn.fastoo.web.api.controller.sys;


import cn.fastoo.common.sampleframe.dto.JsonResult;
import cn.fastoo.common.utils.Constant;
import cn.fastoo.common.utils.JedisDao;
import com.alibaba.fastjson.JSONObject;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import redis.clients.jedis.Jedis;


@Controller
public class MonitorController {

    @RequestMapping(value = "/monitor")
    @ResponseBody
    public String monitor() {
        JSONObject jsonObject = new JSONObject();
        Jedis jedis = JedisDao.getJedis();
        jedis.select(Constant.DB);


        jedis.close();

        return new JsonResult(0,"提交成功",jsonObject).toJson();
    }
}
